package com.ken.quartz.job;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 测试CronTrigger的实例
 * Created by renchongyu on 2018/11/24.
 */
public class CronTriggerJob implements Job{
    public void execute(JobExecutionContext context) throws JobExecutionException {
        //编写具体的业务逻辑
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String time =sdf.format(new Date());
        System.out.println("Current Exec Time is : " +time);
        System.out.println("Hello World! I am CronTrigger.");

    }
}
